#ifndef UHM_MAT_EXTENSION_DIRECT_HXX_
#define UHM_MAT_EXTENSION_DIRECT_HXX_

namespace uhm {

  // Direct solver interfaces.
  class Direct_ {
  public:

    Direct_() { }
    // Need virtual functions....
    // Procedure to solve Ax = b
    // (A, x, b, r)
    // x <= b
    // A <= Decompose(A)
    // x <= Solve(A,x)
    // r <= Check(A,x,b=>r)

    // Flop counting

    virtual Int_ decompose(Double_ &flop)=0; // { return false; }

    virtual Int_ solve_1_x(Double_ &flop)=0; // { return false; }
    virtual Int_ solve_2_x(Double_ &flop)=0; // { return false; }

    virtual Double_ get_leading_flop() { 
      Double_ r_val; 
      this->decompose(r_val); 
      return r_val; 
    }

    virtual Int_ decompose()=0; // { return false; }

    virtual Int_ solve_1_x()=0; // { return false; }
    virtual Int_ solve_2_x()=0; // { return false; }

    virtual Int_ solve_1_r()=0; // { return false; }
    virtual Int_ solve_2_r()=0; // { return false; }
  };

}

#endif
